package com.itheima.String.method;

import com.itheima.pojo.Student;

import java.util.Scanner;

/**
 * @Author 王加鑫
 * @Date 2021/4/27 16:56
 * @Version 1.0
 * 分割字符串
 */
public class SplitTest {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入学生账号和密码:");
        String s = sc.nextLine();
        String[] strings = s.split("\\.");
        Student student = new Student(strings[0],strings[1]);
        System.out.println(student.getUsername() + "..." + student.getPassword());
    }
}
